package com.ruoyi.check.domain;

import java.io.Serializable;
import java.util.List;

import lombok.Data;

/**
 * 盘点子表
 * @TableName bm_check_item
 */
@Data
public class BmCheckItem implements Serializable {
    /**
     * 子表id
     */
    private Long id;

    /**
     * 盘点表id
     */
    private Long checkId;

    private Double oldPrice;

    private String goodsName;

    /**
     * 商品id
     */
    private Long goodId;

    /**
     * 单个商品盘点数量
     */
    private Long num;

    /**
     * 商品规格
     */
    private String specificationName;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BmCheckItem other = (BmCheckItem) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCheckId() == null ? other.getCheckId() == null : this.getCheckId().equals(other.getCheckId()))
            && (this.getGoodId() == null ? other.getGoodId() == null : this.getGoodId().equals(other.getGoodId()))
            && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum()))
            && (this.getSpecificationName() == null ? other.getSpecificationName() == null : this.getSpecificationName().equals(other.getSpecificationName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCheckId() == null) ? 0 : getCheckId().hashCode());
        result = prime * result + ((getGoodId() == null) ? 0 : getGoodId().hashCode());
        result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode());
        result = prime * result + ((getSpecificationName() == null) ? 0 : getSpecificationName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", checkId=").append(checkId);
        sb.append(", goodId=").append(goodId);
        sb.append(", num=").append(num);
        sb.append(", specificationName=").append(specificationName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}